package com.example.demo.serviceimp;

import com.example.demo.entity.RoleFunction;
import com.example.demo.mapper.FunctionMapper;
import com.example.demo.service.FunctionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FunctionServiceImp implements FunctionService {
    @Resource
    private FunctionMapper fm;

    /**
     * 查询用户功能
     * */
    @Override
    public List  selfunc(String user_email) {
        return fm.selfunc(user_email);
    }
    /**
     * 查询角色功能
     * */
    @Override
    public List selrolefunc(Integer rid) {
        return fm.selrolefunc(rid);
    }


    /**
     * 更改角色功能权限
     * */
    @Override
    public int upfunc(Integer pty,Integer fid) {
        return fm.upfunc(pty,fid);
    }

    /**
     * 增加功能
     * */
    @Override
    public int infunc(String function_name, String function_address, Integer role_id) {
        return fm.infunc(function_name,function_address,role_id);
    }


}
